<!DOCTYPE html>
<html>
<head>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />    
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>WonTube - Tools</title>
<link href="style/global.css" rel="stylesheet" type="text/css" />
<link href="style/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery/jquery.js"></script>
<script type="text/javascript" src="js/utils.js"></script>
<script type="text/javascript" src="js/plugin/basic.jquery.js"></script>
<script type="text/javascript" src="js/plugin/smenu.js"></script>
<script type="text/javascript" src="js/plugin/sidebar.js"></script>
<script type="text/javascript">
	$(function(){		
		var p = [];
		if(p.length > 0){
			alert("yes");
		}else{
			alert("no");
		}
	});	
	
	function encodeURL(s) {
	    var img = document.createElement("img");
	    // escapeDBC 对多字节字符编码的函数
	    function escapeDBC(s) {
	        if (!s) return ""
	        if (window.ActiveXObject) {
	            // 如果是 ie, 使用 vbscript
	            execScript('SetLocale "zh-cn"', 'vbscript');
	            return s.replace(/[\d\D]/g, function($0) {
	                window.vbsval = "";
	                execScript('window.vbsval=Hex(Asc("' + $0 + '"))', "vbscript");
	                return "%" + window.vbsval.slice(0,2) + "%" + window.vbsval.slice(-2);
	            });
	        }
	        // 其它浏览器利用浏览器对请求地址自动编码的特性
	        img.src = "nothing.action?separator=" + s;
	        return img.src.split("?separator=").pop();
	    }
	    // 把 多字节字符 与 单字节字符 分开，分别使用 escapeDBC 和 encodeURIComponent 进行编码
	    return s.replace(/([^\x00-\xff]+)|([\x00-\xff]+)/g, function($0, $1, $2) {
	        return escapeDBC($1) + encodeURIComponent($2||'');
	    });
	}

	//alert(encodeURL("中文"));
	
</script>
<style type="text/css">
	p{cursor: default;}
	table,th,td{border: 1px}
	table{border-collapse: collapse;}
	th,td{padding: 5px; font-weight: bold;}
	
	#div1 {border: 1px solid green; margin: 10px}
	#div1-1 {border: 1px solid red;position: relative}
	#div1-1-1{border: 1px solid blue;position: absolute; top: 2px; left: 2px}
</style>
</head>
<body>
		<div id="all">all_div<div class="a">a_div<span class="b">b_span</span></div></div>
		
		<div id="bll">all_div<div class="a">a_div<span class="b">b_span</span></div></div>
</body>
</html>
